package model;

import java.util.LinkedList;
import java.util.List;

public class GridLocation {
	
	private List<Shape> shapes = new LinkedList<Shape>();
	private Shape shape = null;
	private boolean isBlock = false;
	
	public GridLocation(char type) {
		switch (type) {
		case 'B':
			isBlock = true;
			break;
		case 'E':
			break;
		default:
			throw new Error("Unknown grid location type.");
		}
	}
	
	public boolean isPassable() {
		return !isBlock;
	}
	
	public GridLocation(char type, Shape s) {
		this(type);
		addShape(s);
	}

	private void addShape(Shape s) {
		setShape(s);		
	}
	
	public Shape getShape() {
		return shape;
	}
	
	public void setShape(Shape shape) {
		this.shape = shape;
	}

}
